package com.alon.spring01.proxy.staticJdk.service;

/**
 * @program: spring01
 * @description: 代理类
 * @author: yulongguang
 * @create: 2019-08-19 16:11
 **/
public class UserDaoProxy implements IUserDao {

    private IUserDao target;

    public UserDaoProxy(IUserDao target) {
        this.target = target;
    }

    @Override
    public void save() {
        System.out.println("开启事务");
        target.save();
        System.out.println("提交事务");
    }
}
